package com.ews.onlineexchange.controller;

import java.util.LinkedHashMap;
import java.util.Map;

import javax.enterprise.context.ConversationScoped;
import javax.inject.Named;

import org.primefaces.model.TreeNode;

import com.ews.onlineexchange.model.QualificationCert;
import com.ews.onlineexchange.model.QualificationTemplate;
import com.ews.onlineexchange.service.EntityHome;

@Named
@ConversationScoped
public class QualificationCertHome extends EntityHome<QualificationCert, String> {

	/**
	 * 
	 */
	private static final long serialVersionUID = 1L;
	
	TreeNode rootSectorNode;
	Map<Integer, TreeNode[]> selectedNodeMap = new LinkedHashMap<>();
	
	QualificationTemplate currentQualificationTemplate;
	Integer currentQualificationTemplateIndex = 0; 
	
	public void changeQualificationClass() {
		rootSectorNode = null;
		setSelectedNodeMap(new LinkedHashMap<>());
	}

	public TreeNode getRootSectorNode() {
		return rootSectorNode;
	}

	public void setRootSectorNode(TreeNode rootSectorNode) {
		this.rootSectorNode = rootSectorNode;
	}

	public Map<Integer, TreeNode[]> getSelectedNodeMap() {
		return selectedNodeMap;
	}

	public void setSelectedNodeMap(Map<Integer, TreeNode[]> selectedNodeMap) {
		this.selectedNodeMap = selectedNodeMap;
	}

	public QualificationTemplate getCurrentQualificationTemplate() {
		return currentQualificationTemplate;
	}

	public void setCurrentQualificationTemplate(QualificationTemplate currentQualificationTemplate) {
		this.currentQualificationTemplate = currentQualificationTemplate;
	}

	public Integer getCurrentQualificationTemplateIndex() {
		return currentQualificationTemplateIndex;
	}

	public void setCurrentQualificationTemplateIndex(Integer currentQualificationTemplateIndex) {
		this.currentQualificationTemplateIndex = currentQualificationTemplateIndex;
	}

}
